import { lazy } from 'react'
/* import DashBoard from '@pages/DashBoard'
import ItemList from '@pages/ItemLists'
import ItemAdd from '@pages/ItemAdd'
import ItemUpdate from '@pages/ItemUpdate'
import MsgList from '@pages/MsgList'
import Setting from '@pages/Setting' */
import { 
    AreaChartOutlined, 
    OrderedListOutlined,
    MessageOutlined,
    SettingOutlined

  } from '@ant-design/icons'
const DashBoard = lazy(()=> import('@pages/DashBoard'))
const ItemList = lazy(()=> import('@pages/ItemLists'))
const ItemAdd = lazy(()=> import('@pages/ItemAdd'))
const ItemUpdate = lazy(()=> import('@pages/ItemUpdate'))
const MsgList = lazy(()=> import('@pages/MsgList'))
const Setting = lazy(()=> import('@pages/Setting'))
const routes = [
  {
    path: '/admin/dashBoard',
    isNav: true,
    name:'仪表盘',
    roles: ['admin', 'a', 'b'],
    icon: AreaChartOutlined,
    component: DashBoard
  },
  {
    path: '/admin/itemList',
    name: '商品管理',
    isNav: true,
    roles: ['admin', 'a', 'b'],
    icon: OrderedListOutlined,
    component: ItemList
  },
  {
    path: '/admin/itemAdd',
    name:'增加商品',
    roles: ['admin', 'a', 'b'],
    isNav: false,
    component: ItemAdd
  },
  {
    path: '/admin/itemUpdate/:id',
    name: '更新商品',
    roles: ['admin', 'a', 'b'],
    isNav: false,
    component: ItemUpdate
  },
  {
    path: '/admin/msgList',
    name:'消息中心',
    roles: ['admin', 'a', 'b'],
    icon: MessageOutlined,
    isNav: true,
    component: MsgList
  },
  {
    path: '/admin/setting',
    name: '设置',
    roles: ['a', 'b'],
    isNav: true,
    icon: SettingOutlined,
    component: Setting
  }
]

export default routes